//
//  XDUserCenterCell.m
//  xindailianmeng
//
//  Created by 张东 on 2017/2/21.
//  Copyright © 2017年 xindailianmeng.cn. All rights reserved.
//

#import "XDUserCenterCell.h"
#import "UIImageView+WebCache.h"
@interface XDUserCenterCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLb;

@property (weak, nonatomic) IBOutlet UILabel *detailLb;

@property (weak, nonatomic) IBOutlet UIImageView *bankImg;

@end


@implementation XDUserCenterCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self = [[NSBundle mainBundle] loadNibNamed:@"XDUserCenterCell" owner:self options:nil].firstObject;
    }
    return self;
}

- (void)cellWithTitle:(NSString *)title dateil:(NSString *)dateil bankImg: (NSString *)bankImg bindStatusStr:(NSString *)bindStatusStr index:(NSIndexPath *)index  {
    
    self.titleLb.text = title;
    
    self.detailLb.text = dateil;
    
    
    if ([bindStatusStr isEqualToString:@"Y"] && index.section == 0) {
        self.detailLb.textColor = kColorRGB(51,51,51);
         [self.bankImg sd_setImageWithURL:[NSURL URLWithString:bankImg]];
         self.bankImg.hidden = NO;
    } else {
        self.detailLb.textColor = kColorRGB(102,102,102);
        self.bankImg.hidden = YES;
    }
   
}

@end
